

#include "CommandApi.hpp" 
#include "../OLCore/AbstractCommand.hpp" 
#include "../OLCore/AbstractDataItem.hpp"

namespace NSCommands {
	
	/**
	 * @brief class DataBaseItemDoubleClickedCommand
	 * @param NSCore::AbstractDataItem*
	 */
	class COMMANDSAPI DataBaseItemDoubleClickedCommand : public NSCore::AbstractCommand
	{
	public:
		DataBaseItemDoubleClickedCommand(NSCore::AbstractDataItem* item) : m_item(item) {};
		virtual ~DataBaseItemDoubleClickedCommand()override {};
		inline QString className() override { return "DataBaseItemDoubleClickedCommand"; };
		virtual void execute() override;
		virtual void undo() override;
	private:
		NSCore::AbstractDataItem* m_item{ nullptr };
		int m_last_index{ -1 };
		int m_current_index{ -1 };
		int m_rbs_tab_index{ -1 };
	};

}